package com.example.demo.service;

import com.example.demo.domain.Order;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrderService {

    // 查
    public Order getOrderById(Integer id);


    //查询用户相关订单 state 0:购物车 1：支付  2:后台同意发货 3.付款 4.退货 5.后台同意退货
    //获取购物车订单
    List<Order> getCartOrderByUid(Integer uid,Integer start,Integer end);

    //查询非购物车订单
    List<Order> getNonCartOrderByUid(Integer uid,Integer start,Integer end);

    //更新 order state
    void saveOrderState(Integer id,Integer state);

    public List<Order> getOrder(Integer state);

    public List<Order> getSearch(String searchText,Integer state);

    public List<Order> getHistoryOrders();

    public List<Order> getHistoryOrderSearch(String searchText);

    public Integer getIdByOrder(Order order);

    Order getBaseOrderById(Integer id);

    //增
    void addOrder(Order order);

    // 删
    void delOrderById(Integer id);

    // 改
    void saveOrder(Order order);
}
